/* =========================================
   DIME REWARDS CUSTOM STYLES (ENHANCED)
   ========================================= */

/* Defining unique colors for each card */
:root {
    --card-accent-super: #AA96DA;  /* Soft Purple */
    --card-accent-elite: #a1d6a6;  /* Soft Green */
    --card-accent-gold: #FFBF69;   /* Soft Orange/Gold */
    --card-accent-invite: #c2a608; /* Premium Gold */
    --card-accent-dark-glow: rgba(0,0,0,0.15); /* Soft black glow */
}

/* Keyframes for Staggered Animation */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 1. Top Tier Cards (Modernized Grid & Animation) --- */
.tier-section {
    padding: 60px 5% 100px;
    max-width: 1400px;
    margin: 0 auto;
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.tier-card {
    border: 1px solid black;
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 3px 6px 8px rgba(0, 0, 0, 0.15);
    background-color: var(--white);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    border-radius: 2px;
    
    /* Apply initial staggered animation to ALL cards */
    animation: fadeInSlideUp 0.6s ease forwards;
    opacity: 0; /* Ensures they are hidden until animation starts */
}

/* Increase delay for each card */
.tier-card.plan-1 { animation-delay: 0.2s; }
.tier-card.plan-2 { animation-delay: 0.4s; }
.tier-card.plan-3 { animation-delay: 0.6s; }
.tier-card.plan-4 { animation-delay: 0.8s; }

/* SHARED HOVER LOGIC */
.tier-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px var(--card-accent-dark-glow); /* Enhanced drop shadow */
}

.tier-card:hover h2,
.tier-card:hover .tier-sub {
    color: var(--card-accent-color); /* Title shifts to its accent color */
    transition: color 0.4s ease;
}

.tier-card img {
    display: block;          /* Forces the image to behave like a solid block */
    margin: 0 auto 20px auto; /* Pushes equally from the left and right to center it */
    transition: transform 0.4s ease;
}

/* Icons slightly enlarge on hover */
.tier-card:hover img {
    transform: scale(1.15);
}

.tier-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

/* Color definitions per card */
.super { --card-accent-color: var(--card-accent-super); }
.elite { --card-accent-color: var(--card-accent-elite); }
.gold { --card-accent-color: var(--card-accent-gold); }
.invite { --card-accent-color: var(--card-accent-invite); }

/* Apply individual glow on hover */
.super:hover { box-shadow: 0 10px 40px rgba(170, 150, 218, 0.1); border-color: var(--card-accent-super); }
.elite:hover { box-shadow: 0 10px 40px rgba(161, 214, 166, 0.1); border-color: var(--card-accent-elite); }
.gold:hover { box-shadow: 0 10px 40px rgba(255, 191, 105, 0.1); border-color: var(--card-accent-gold); }

/* SPECIAL STYLE FOR THE INVITE ONLY CARD */
.invite-card:hover {
    background: linear-gradient(to bottom right, #f1ece6, var(--white)); /* Subtle premium gradient on hover */
    box-shadow: 0 10px 40px rgba(194, 166, 8, 0.15);
    border-color: var(--card-accent-invite);
}

.tier-card h2 {
    font-size: 24px;
    margin-bottom: 5px;
    text-align: center;
}

.tier-sub {
    font-size: 22px;
    font-family: 'Times New Roman', Times, serif;
    text-align: center;
    margin-bottom: 20px;
}

.card-line {
    height: 1px;
    width: 100%;
    background-color: black;
    margin-bottom: 30px;
    transition: background-color 0.4s ease;
}

/* Divider shifts on hover */
.tier-card:hover .card-line {
    background-color: var(--card-accent-color);
}

.tier-card ul {
    list-style: none;
    width: 100%;
    padding: 0;
}

.tier-card li {
    font-family: 'Times New Roman', Times, serif;
    font-size: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.invite-text {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
    text-align: center;
    font-size: 16px;
}

/* --- 2. Ways to Earn Points (Your Custom Animation kept) --- */
.card-box-body {
    font-family: 'Poppins', sans-serif;
    background-color: hsl(0, 0%, 0%);
    padding: 80px 0 100px;
}

.ways-title {
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
    color: white;
    font-weight: 500;
    font-size: 32px;
    margin-bottom: 60px;
    letter-spacing: 2px;
}

.container {
    max-width: 1170px;
    padding: 0 15px;
    margin: auto;
}

.section-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.section-card {
    background-color: hsl(220, 6%, 10%);
    padding: 120px 30px 40px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 5px;
    overflow: hidden;
}

/* Your custom colors */
.section-card:nth-child(1) { --color: var(--card-accent-super); }
.section-card:nth-child(2) { --color: var(--card-accent-elite); }
.section-card:nth-child(3) { --color: var(--card-accent-gold); }

/* The circle expansion animation */
.section-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background-color: var(--color);
    z-index: -1;
    clip-path: circle(40px at 70px 70px);
    transition: clip-path 1s ease;
}

.section-card:hover::before {
    clip-path: circle(150% at 70px 70px); /* 150% ensures it covers the whole box */
}

/* The Icon stays centered */
.section-card span {
    position: absolute;
    left: 30px;
    top: 30px;
    height: 80px;
    width: 80px;
    font-size: 50px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(0, 0%, 0%);
    transition: transform 0.6s ease;
}

.section-card:hover span {
    transform: scale(1.1); /* Slightly enlarge icon on hover instead of translate */
}

.section-card h3 {
    font-size: 26px;
    color: hsl(0, 0%, 100%);
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    transition: color 0.6s ease;
}

.section-card p {
    color: hsl(0, 0%, 85%);
    line-height: 1.6;
    text-align: center;
    transition: color 0.6s ease;
}

.section-card a {
    display: inline-block;
    color: hsl(0, 0%, 100%);
    margin-top: 25px;
    font-weight: 500;
    text-align: center;
    text-decoration: underline;
    transition: color 0.6s ease;
}

.section-card:hover a,
.section-card:hover h3,
.section-card:hover p {
    color: hsl(0, 0%, 0%);
}

/* --- 3. Referral Section (Split Screen) --- */
.referral-section {
    padding: 80px 5%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
}

.referral-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    gap: 60px;
}

@media (min-width: 900px) {
    .referral-container {
        flex-direction: row; /* Side-by-side on desktop */
    }
}

.referral-img-wrapper {
    flex: 1;
    width: 100%;
    display: flex;
    justify-content: center;
}

.referral-img-wrapper img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.referral-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 500px;
}

.referral-sub {
    font-size: 22px;
    font-family: 'Times New Roman', Times, serif;
    color: #5b5a5a;
    margin-bottom: 10px;
}

.referral-text-wrapper h1 {
    font-size: 40px;
    font-family: 'Times New Roman', Times, serif;
    margin-bottom: 20px;
}

.referral-desc {
    font-size: 22px;
    font-family: 'Times New Roman', Times, serif;
    color: #5b5a5a;
    line-height: 1.4;
    margin-bottom: 40px;
}

/* Your custom floating label input */
.input-group {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
}

.input-referral {
    border: solid 1.5px #5b5a5a;
    border-radius: 7px;
    background: none;
    padding: 15px 15px;
    font-size: 18px;
    color: #000000;
    width: 100%;
}

.label-referral {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #5b5a5a;
    font-weight: 500;
    font-size: 18px;
    pointer-events: none;
    transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--white); /* Helps hide the border behind the text when it moves up */
    padding: 0 5px;
}

.input-referral:focus, .input-referral:valid {
    outline: none;
    border: 1.5px solid #000000;
}

.input-referral:focus ~ .label-referral, .input-referral:valid ~ .label-referral {
    transform: translateY(-200%) scale(0.8); /* Moves it up to the border line */
    color: #000;
}

.referral-btn {
    padding: 16px 60px;
    font-size: 16px;
    background-color: black;
    color: white;
    border: 1px solid black;
    width: 100%;
    max-width: 400px;
    cursor: pointer;
    transition: all 0.45s ease;
    letter-spacing: 2px;
}

.referral-btn:hover {
    background-color: white;
    color: black;
}

